#include "cds_list.h"
#include "stdlib.h"
#include "stdio.h"
#ifdef __cplusplus
extern "C" {
#endif
//清空链表
void list_clear(struct list_head * head ){
    struct list_head * dnode = head->next;
    while(dnode!=head){
        struct list_head * next = dnode->next;
        free(dnode);
        dnode = next;
    }
    INIT_LIST_HEAD(head);    
}
#ifdef __cplusplus
}
#endif
